package com.myself.module.authority.model;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 关系-用户-角色(1-P)
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "r_user_role")
public class UserRole {
    private static final long serialVersionUID = 1L;
    /**
     * 关系主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 用户主键
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 角色主键
     */
    @TableField(value = "role_id")
    private Integer roleId;

    /**
     * 启用
     */
    @TableField(value = "`enable`")
    private Boolean enable;
}